<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <link
      rel="stylesheet"
      type="text/css"
      href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0/codemirror.css"
    />
    <link
      rel="stylesheet"
      type="text/css"
      href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0/addon/lint/lint.css"
    />
    <link
      rel="stylesheet"
      type="text/css"
      href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.43.0/theme/neo.css"
    />
    <link rel="stylesheet" type="text/css" href="./css/example.css" />
    <link rel="stylesheet" href="../dist/toastui-chart.css" />
    <title>15.3 [LineScatter Chart] Data with visible options</title>
  </head>
  <body>
    <div class="description">
      You can see the tutorial
      <a href="https://github.com/nhn/tui.chart/blob/main/docs/en/chart-lineScatter.md" target="_blank">here</a>
      <br />
      <strong
        >The example code can be slower than your environment because the code is transpiled by
        babel-standalone in runtime.</strong
      >
    </div>
    <div class="wrap">
      <div class="code-html" id="code-html">
        <div id="chart-area"></div>
      </div>
      <div class="custom-area">
        <div id="error-dim">
          <span id="error-text"></span>
          <div id="error-stack"></div>
          <span id="go-to-dev-tool"
            >For more detail, open browser's developer tool and check it out.</span
          >
        </div>
        <div class="try-it-area">
          <h3>try it</h3>
          <textarea id="code"></textarea>
          <div class="apply-btn-area">
            <button class="btn" onclick="evaluationCode(chartCM, codeString);">Run it!</button>
          </div>
        </div>
      </div>
    </div>
    <script src="https://unpkg.com/babel-standalone@6.26.0/babel.min.js"></script>
    <script src="../dist/toastui-chart.js"></script>
    <script class="code-js" id="code-js" type="text/babel">
      const el = document.getElementById('chart-area');
      const data = {
        series: {
          scatter: [
            {
              name: 'Efficiency',
              data: [
                { x: 10, y: 20 },
                { x: 14, y: 30 },
                { x: 18, y: 10 },
                { x: 20, y: 30 },
                { x: 22, y: 50 },
                { x: 24, y: 15 },
                { x: 25, y: 25 },
                { x: 26, y: 55 },
                { x: 28, y: 45 },
                { x: 30, y: 35 },
                { x: 34, y: 55 },
                { x: 36, y: 35 },
                { x: 37, y: 55 },
                { x: 38, y: 40 },
                { x: 40, y: 50 },
                { x: 42, y: 50 },
                { x: 46, y: 40 },
                { x: 47, y: 34 },
                { x: 48, y: 25 },
                { x: 50, y: 29 },
                { x: 54, y: 15 },
                { x: 58, y: 30 },
                { x: 62, y: 40 },
                { x: 64, y: 50 },
                { x: 66, y: 20 },
                { x: 65, y: 25 },
                { x: 70, y: 65 },
                { x: 71, y: 70 },
                { x: 73, y: 55 },
                { x: 74, y: 71 },
                { x: 78, y: 58 },
                { x: 82, y: 73 },
                { x: 86, y: 80 },
                { x: 93, y: 95 },
              ],
              visible: false,
            },
          ],
          line: [
            {
              name: 'Expenses',
              data: [
                { x: 5, y: 5 },
                { x: 30, y: 50 },
                { x: 55, y: 25 },
                { x: 90, y: 90 },
              ],
            },
          ],
        },
      };
      const options = {
        chart: { title: 'Efficiency vs Expenses', width: 900, height: 500 },
      };

      const chart = toastui.Chart.lineScatterChart({ el, data, options });
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.0/codemirror.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.0/addon/edit/matchbrackets.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.0/addon/selection/active-line.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.0/mode/javascript/javascript.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.0/addon/lint/lint.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.59.0/addon/lint/javascript-lint.js"></script>
    <script src="./js/example.js" type="text/babel"></script>
  </body>
</html>
